USE [@DATABASE]

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Yazilim_isDeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Yazilim] DROP CONSTRAINT [DF_Yazilim_isDeleted]
END

USE [@DATABASE]

/****** Object:  Table [dbo].[Yazilim]    Script Date: 02/11/2013 21:31:51 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Yazilim]') AND type in (N'U'))
DROP TABLE [dbo].[Yazilim]

USE [@DATABASE]

/****** Object:  Table [dbo].[Yazilim]    Script Date: 02/11/2013 21:31:51 ******/
SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[Yazilim](
	[yID] [int] IDENTITY(1,1) NOT NULL,
	[yiID] [int] NULL,
	[ysID] [int] NULL,
	[LisansNo] [nvarchar](200) NULL,
	[EnvanterGirisTarihi] [datetime] NULL,
	[LisBasTarih] [datetime] NULL,
	[LisBitTarih] [datetime] NULL,
	[LisTuru] [nvarchar](50) NULL,
	[Aciklama] [nvarchar](max) NULL,
	[yuID] [int] NULL,
	[tID] [int] NULL,
	[Maliyet] [money] NULL,
	[ZimmetDegeri] [money] NULL,
	[MaliyetDoviz] [nvarchar](10) NULL,
	[ZimmetDegeriDoviz] [nvarchar](10) NULL,
	[DepoId] [int] NULL,
	[isDeleted] [bit] NULL,
 CONSTRAINT [PK_YazilimDetay] PRIMARY KEY CLUSTERED 
(
	[yID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[Yazilim] ADD  CONSTRAINT [DF_Yazilim_isDeleted]  DEFAULT ((0)) FOR [isDeleted]